/**
 * 
 */

/**
 * @author 
 * Yannic Remmet			196983
 * Tobias Trabelsi			197112
 * Anna-Katharina Wickert	197122
 */
public class Salad extends SideDishes{
	public Salad(Meal meal){
		this.meal = meal;
	}
	
	public Salad(){
		meal = null;
	}
	
	public boolean isEatable(){
		return (meal == null) ? eatAble : meal.isEatable() && eatAble;
	}
	
	public double getPrice(){
		return (meal == null) ? price : meal.getPrice() + price;
	}
	public void printDescription() {
		if (meal != null)
			meal.printDescription();
		System.out.println("Salad (Eatbale: " + ((eatAble) ? "yes" : "no") + " )");
	}

	public void setPrice(double price){
		this.price = price;
	}
	public void setMeal(Meal meal){
		this.meal = meal;
	}
	
	private Meal meal;
	private boolean eatAble = true;
	private double price = 0.45;
	
}
